<!--公共开始-->
<include file="./public" />
<!--公共结束-->
<title>7min理财</title>
<script type="text/javascript" src="__ROOT__/js/jquery.layer.js"></script>
<script type="text/javascript" src="__ROOT__/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
$(function() {
    $(".adviser:even").addClass("adviser01");
	$(".adviser:odd").addClass("adviser02");
});
</script>
<script type="text/javascript">
var v=1;
var vid=0;
$(function() {
   //clearall();
   tabs(".zx_tab","on",".zx_con")
   showinfo(1);
})



function showinfo(id){
       vid = id;
       $.ajax({  
        type: "post",  
        url: "__URL__/pagebinding",
        dataType: 'json',
        data: {v:id},  
        beforeSend: function(XMLHttpRequest){
        },  
        success: function(json){
            if(json != null){
                $("#spanname").text(json.data[0].advisername);
                $("#spanjinli").text(json.data[0].desc);
                $("#spanshanchang").text(json.data[0].goodat);
                $("#imghead").attr("src",json.data[0].smallimg);
                $("#txtaccemail").val(json.data[0].email);
            }
        } 
    })
}


</script>
</head>

<body>
<!--头部+顶部开始-->
<include file="./top" />
<!--头部+顶部结束-->
<!--主体开始-->
<div class="main-content">
	<!--费用-->
    <div class="panel">
    	<div class="panel-body advise_price">
        	<div class="advise_price_img left">
            	<img src="__ROOT__/images/advise_img_01.jpg" />
            </div>
            <div class="advise_price_info right">
            	<h2><i class="fa fa-envelope text-danger"></i>邮件咨询</h2>
                <p>发邮件---免费</p>
                <p>
1. 告诉我们您在理财上碰到的难题，您投资的困惑。<br>
2. 我们分析您目前的投资状况，分享我们的投资观点。<br>
3. 24小时内邮箱回复，让您更快捷的管理您的资产，获取最新投资建议。

                </p>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
            <div class="blank10"></div><div class="blank10"></div>
            <div class="advise_price_info left">
            	<h2><i class="fa fa-coffee text-danger"></i>面见咨询</h2>
                <p>费用：700元/小时</p>
                <p>
                	1.一对一的投资咨询服务，为您精准把握市场。<br>
                    2.各个板块的专家为您提供简单、独立、专业的理财咨询，成为您的私人理财管家。<br>
                    3.量身定做理财方案，应对市场变化。
                </p>
                <div class="clear"></div>
            </div>
            <div class="advise_price_img right align-right">
            	<img src="__ROOT__/images/advise_img_02.jpg" />
            </div>
            <div class="clear"></div>
        </div>
    </div>
    <div class="clear"></div>
    
    <!--咨询人员1-->
    
    <?php foreach($adviserList as $k => $v){?>
    <div class="panel adviser">
        <div class="panel-body">
            <div class="zx_img left">
            	<img src="<?php echo '__ROOT__'.$v['smallimg']?>" />
            </div>
            <div class="zx_info left">
                <div>
                    <span class="p-head">姓　　名：</span>
                    <p><?php echo $v['advisername'];?></p>
                </div>
                <!--
                <div>
                    <span class="p-head">工作经历：</span>
                    <p><?php echo $v['workexp'];?></p>
                </div>
                <div>
                    <span class="p-head">从业时间：</span>
                    <p><?php echo $v['worktime'];?>&nbsp;</p>
                </div>
                -->
                <div>
                    <span class="p-head">个人简介：</span>
                    <p><?php echo $v['desc'];?></p>
                </div>
                <div>
                    <span class="p-head">主要负责：</span>
                    <p><?php echo $v['goodat'];?></p>
                </div>
                <div class="zx_tool">
                    <?php if ($username){?>
                    <a data-reveal-id="appointment" class="btn btn-danger" href="javascript:void(0)">预约面见</a>
                    <a data-reveal-id="askOnLine" class="btn btn-success" href="#">邮件咨询</a>
                    <?php }else {?>
                        <a  class="btn btn-danger" href="__APP__/Uc/User/login">马上登录咨询</a>
                    <?php }?>    
                </div>
            </div>
            <div class="clear"></div>
            
        </div>
    </div>
    <?php }?>
    
    
    
</div>
<!--主体结束-->
<!--底部开始-->
<include file="./foot" />
<!--底部结束-->
<!--预约弹出层开始-->
<script type="text/javascript">
$(function() {
   $(".close_layer").click(function(){
		$("#sent_notice_mobile").hide();
		$("#sent_notice_email").hide();	
	});

   $("#txtDate").blur(function(){
	   if($("#txtDate").val()==""){
			spanshow("spanDate","要写预约时间");
		}else{
			spanhide("spanDate");
		}
	})
   $("#txtMobile").blur(function() {                 
	   if(!checkmobile($.trim($("#txtMobile").val()))){
		   spanshow("spanMobile","手机号错误或不能为空");
	   }else{
		   spanhide("spanMobile");
	   }
   });  
   
    
   $("#txtsendemail").blur(function() {                 
	   if(!checkemail($.trim($("#txtsendemail").val()))){
		   spanshow("spanEmail","邮箱格式错误");
	   }else{
		   spanhide("spanEmail");
	   }
   });
   
   $("#txtContent1").blur(function() {                 
       if($("#txtContent1").val()==""){
           spanshow("spanContent1","内容必须要写");
       }else if($("#txtContent1").val().length >500){
           spanshow("spanContent1","问题标题不能超过500个字符");
       }else{
           spanhide("spanContent1");
       }
    }); 
   $("#txtContent2").blur(function() {                 
       if($("#txtContent2").val()==""){
           spanshow("spanContent2","内容必须要写");
       }else if($("#txtContent2").val().length >500){
           spanshow("spanContent2","问题标题不能超过500个字符");
       }else{
           spanhide("spanContent2");
       }
    }); 
    $("#txtContent1").keyup(function() {                 
       if($("#txtContent1").val().length >500){
           spanshow("spanContent1","问题内容不能超过500个字符");
       }else{
           spanhide("spanContent1");
       }
    }); 
    $("#txtContent2").keyup(function() {                 
       if($("#txtContent2").val().length >500){
           spanshow("spanContent2","问题内容不能超过500个字符");
       }else{
           spanhide("spanContent2");
       }
    }); 
	
	$("#txtTitle1").blur(function() {                 
       if($("#txtTitle1").val()==""){
           spanshow("spanTitle1","标题必须要写");
       }else if($("#txtTitle1").val().length >50){
           spanshow("spanTitle1","问题标题不能超过50个字符");
       }else{
           spanhide("spanTitle1");
       }
    }); 
	
    $("#txtTitle1").keyup(function() {                 
       if($("#txtTitle1").val().length >50){
           spanshow("spanTitle1","问题标题不能超过50个字符");
       }else{
           spanhide("spanTitle1");
       }
    }); 
	$("#txtTitle2").blur(function() {                 
       if($("#txtTitle2").val()==""){
           spanshow("spanTitle2","标题必须要写");
       }else if($("#txtTitle2").val().length >50){
           spanshow("spanTitle2","问题标题不能超过50个字符");
       }else{
           spanhide("spanTitle2");
       }
    }); 
    $("#txtTitle2").keyup(function() {                 
       if($("#txtTitle2").val().length >50){
           spanshow("spanTitle2","问题标题不能超过50个字符");
       }else{
           spanhide("spanTitle2");
       }
    }); 
    
    $("#btnsave").click(function(){
		if($("#txtDate").val()==""){
			spanshow("spanDate","要写预约时间");
            return false;
		}
        if(!checkmobile($.trim($("#txtMobile").val()))){
			spanshow("spanMobile","手机号错误或不能为空");
            return false;   
        }
        if($("#txtTitle1").val().length >50){
			spanshow("spanTitle1","问题标题不能超过50个字符");
            return false;
        }
		if($("#txtTitle1").val()==""){
           spanshow("spanTitle1","标题必须要写");
		   return false;
       }
	   if($("#txtContent1").val()==""){
           spanshow("spanContent1","内容必须要写");
		   return false;
       }
	   if($("#txtContent1").val().length >500){
           spanshow("spanContent1","问题标题不能超过500个字符");
		   return false;
       }
        mobileadd();
    });
    $("#btnsend").click(function(){ 
        
		if(!checkemail($.trim($("#txtsendemail").val()))){
			spanshow("spanEmail","邮箱格式错误或不能为空");
            return false;
        }
        if($("#txtTitle2").val().length >200){
            
        }
		if($("#txtTitle2").val()==""){
           spanshow("spanTitle2","标题必须要写");
		   return false;
       }
	   if($("#txtTitle2").val().length >50){
           spanshow("spanTitle2","问题标题不能超过50个字符");
		   return false;
	   }
		if($("#txtContent2").val()==""){
           spanshow("spanContent2","内容必须要写");
		   return false;
       }
	   if($("#txtContent2").val().length >500){
           spanshow("spanContent2","问题标题不能超过500个字符");
		   return false;
       }
        emailadd();
    });
    
})



function spanshow(obj,text){
    $("#"+obj).show();
    $("#"+obj).html("<i class='fa fa-times-circle'></i>"+text);    
}

function spanhide(obj){
    $("#"+obj).hide();
    $("#"+obj).html("");    
}

function checkmobile(mobile){
    var reg=/^1[34578]\d{9}$/;
    return reg.test(mobile);
}

function checkemail(email){
    var reg=/([a-z0-9]*[-_\.]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[\.][a-z]{2,3}([\.][a-z]{2})?/i;
    return reg.test(email);
}

//全部清空
function clearall(){
    //清空文本框
    $("#txtDate").val("");
	$("#txtTitle1").val("");
    $("#txtContent1").val("");
    $("#txtTitle2").val("");
    $("#txtContent2").val("");
    $("#txtQuestion").val("");    
}


function mobileadd(){
       var apptime = $("#txtDate").val();
       var appmobile = $.trim($("#txtMobile").val());
       var apptitle = $.trim($("#txtTitle1").val());
       var appcontent = $.trim($("#txtContent1").val());
       
       $.ajax({  
        type: "post",  
        url: "__APP__/Uc/Ask/mobileadd",
        dataType: 'json',
        data: {apptime:apptime,appmobile:appmobile,apptitle:apptitle,appcontent:appcontent,vid:vid},  
        beforeSend: function(XMLHttpRequest){
        },  
        success: function(json){
            if(json.data == 1){
                //$("#btnqx").click();
                //alert(json.info); 
				$("#sent_notice_mobile p").text(json.info);
				$("#sent_notice_mobile").show();
            }else{
                //alert(json.info);
				$("#sent_notice_mobile p").text(json.info);
				$("#sent_notice_mobile").show();
            }
        } 
    })
    clearall();
}


function emailadd(){
    var appemail = $("#txtsendemail").val();
    var apptitle = $.trim($("#txtTitle2").val());
    var appcontent = $.trim($("#txtContent2").val());
    
   $.ajax({  
        type: "post",  
        url: "__APP__/Uc/Ask/emailadd",
        dataType: 'json',
        data: {appemail:appemail,apptitle:apptitle,appcontent:appcontent,vid:vid},  
        beforeSend: function(XMLHttpRequest){
        },  
        success: function(json){
            if(json.data == 1){
                //$("#btnqx").click();
                //alert(json.info);  
				$("#sent_notice_email p").text(json.info);
				$("#sent_notice_email").show();
            }else{
                //alert(json.info); 
				$("#sent_notice_email p").text(json.info);
				$("#sent_notice_email").show();
            }
        } 
    })
    clearall();
}

</script>

<div id="appointment" class="reveal-modal panel large">
    <div class="panel-head">
        预约面谈&nbsp;<span class="text-danger">[700元/小时]</span>
        <a class="close-reveal-modal close_layer">×</a>
    </div>
    <div class="panel-body" style="position:relative">
        <h2 class="align-center">请提前至少48小时预约</h2>
        <div class="layerForm">
            <p>
                <label>预约时间：</label>
                <input type="text" id="txtDate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd H:mm',minDate:'%y-%M-{%d+2}',disabledDates:['....-..-.. 0[0-9]\:..\:..','....-..-.. 1[6-9]\:..\:..','....-..-.. 2[0-3]\:..\:..']})" class="form-control Wdate" name="" placeholder="选择预约时间" />
                <span class="text-danger">（10:00-16:00）</span>
                <span style="display:none;" class="notice_wrong" id="spanDate"></span>
            </p>
            <p>
                <label>您的手机：</label>
                <input name="" class="form-control" placeholder="手机号" type="text" id="txtMobile" maxlength="11" value="{$mobile}">
                <span style="display:none;" class="notice_wrong" id="spanMobile"></span>
            </p>
            <p>
                <label>咨询主题：</label>
                <input name="" class="form-control" placeholder="咨询主题" type="text" id="txtTitle1" maxlength="200" >
                <span style="display:none;" class="notice_wrong" id="spanTitle1"></span>
            </p>
            <p>
                <label>咨询内容：</label>
                <textarea name="" cols="" rows="" id="txtContent1" placeholder="填写想咨询的问题"></textarea>
                <span style="display:none;" class="notice_wrong" id="spanContent1"></span>
            </p>
            <p style="padding-left:20%;">
                <a class="btn btn-danger" type="button" style="width:20%" id="btnsave">提 交</a>
                <a class="btn btn-success close-reveal-modal" style="width:20%" id="btnqx">取 消</a>
            </p>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
        <div class="send_notice" style="display:none;" id="sent_notice_mobile">
        	<p></p>
        </div>
    </div>
</div>
<div id="askOnLine" class="reveal-modal panel large">
    <div class="panel-head">
        邮件咨询&nbsp;<span class="text-danger">[免费]</span>
        <a class="close-reveal-modal close_layer">×</a>
    </div>
    <div class="panel-body" style="position:relative">
        <div class="layerForm">
            <p>
                <label>发 件 人：</label>
                <input type="text" class="form-control" name="" placeholder="填写您的邮箱地址" id="txtsendemail" value="{$email}"/>
                <span style="display:none;" class="notice_wrong" id="spanEmail"></span>
            </p>
            <!--<p>
                <label>收 件 人：</label>
                <input name="" class="form-control"  type="text" disabled="disabled" id="txtaccemail" />
            </p>-->
            <p>
                <label>咨询主题：</label>
                <input name="" class="form-control" placeholder="填写您的咨询主题" type="text" id="txtTitle2"/>
                <span style="display:none;" class="notice_wrong" id="spanTitle2"></span>
            </p>
            <p>
                <label>咨询内容：</label>
                <textarea name="" cols="" rows="" placeholder="填写您的咨询内容" id="txtContent2"></textarea>
                <span style="display:none;" class="notice_wrong" id="spanContent2"></span>
            </p>
            <p style="padding-left:20%;">
                <a class="btn btn-danger" type="button" style="width:20%" id="btnsend">提  交</a>
                <a class="btn btn-success close-reveal-modal" style="width:20%">取 消</a>
            </p>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
        <div class="send_notice" style="display:none;" id="sent_notice_email">
        	<p>您咨询的问题已收到，我们的顾问会在24小时内回复到您的邮箱！7min团队感谢您的支持！</p>
        </div>
    </div>
</div>
<!--预约弹出层结束-->
</body>
</html>
